package com.pimee.web.sys;

import java.util.Map;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.pagehelper.PageInfo;
import com.pimee.model.SysEvent;
import com.pimee.service.admin.ISysEventService;
import com.pimee.web.AbstractController;

import io.swagger.annotations.ApiOperation;

/**
 * 操作日志列表
 * @author Bruce Shaw
 * 2020年2月3日 下午12:20:42
 *
 */
@Controller
@RequestMapping("/admin/sys/event")
public class SysEventController extends AbstractController {

	@Autowired
	private ISysEventService sysEventService;

	@ApiOperation("查询参数配置分页列表")
	@RequiresPermissions("system:event:list")
	@PostMapping("/list")
	@ResponseBody
	public Object pageList(@RequestParam Map<String, Object> params, ModelMap modelMap) {
		PageInfo<SysEvent> pageList = sysEventService.pageList(params);
		return setSuccessModelMap(modelMap, pageList);
	}

}
